<template>
    <div class="coach-view">
        <panel :list="list" :type="type" @on-click-item="handleClick"></panel>
    </div>
</template>


<script>
import { Panel } from 'vux'
export default {
    name: 'Coach',
    components: {
        Panel
    },
    methods: {
        handleClick(item) {
            // alert(item)
        }
    },
    created () {
        this.$store.dispatch('getCoachList').then(res => {
            this.list = res.list
        })  
    },
    data () {
        return {
            type: '5',
            list: []
            // list: [{
            //     src: require('@/assets/avatar.png'),
            //     title: '教练一',
            //     desc: '带你吃鸡',
            //     url: '/coach/1'
            // }, {
            //     src: require('@/assets/avatar.png'),
            //     title: '教练二',
            //     desc: '带你吃鸡',
            //     url: '/coach/2'
            // }, {
            //     src: require('@/assets/avatar.png'),
            //     title: '教练三',
            //     desc: '带你吃鸡',
            //     url: '/coach/3'
            // }]
        }
    }
}
</script>